home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / apps.to.go / DTS.Lib / TextEditControl.a < prev    next >
Encoding:
Text File  |  1994-05-04  |  1.2 KB  |  57 lines  |  [TEXT/MPS ]

  1.         include    'traps.a'
  2.         include    'quickequ.a'
  3. ;
  4. ;    Apple Macintosh Developer Technical Support
  5. ;
  6. ;    Copyright © 1989-1991 Apple Computer, Inc.
  7. ;    All rights reserved.
  8. ;
  9. ;    Originally from:  TESample, by Bryan Stearns
  10. ;    Modified by:      Eric Soldan
  11. ;
  12. ;    AsmTEClikLoop
  13. ;
  14. ;    This routine gets called by the TextEdit Manager from TEClick.
  15. ;    It calls the old, default click loop routine that scrolls the
  16. ;    text, and then calls our own Pascal routine that handles
  17. ;    tracking the scroll bars to follow along.  It doesn't bother
  18. ;    with saving registers A0 and D0, because they are trashed
  19. ;    anyway by TextEdit.
  20. ;
  21.  
  22.         case    on
  23.  
  24.         seg    'Controls'
  25. ASMTECLIKLOOP    proc    export
  26.         import    gDefaultClikLoopUPP:DATA
  27.         import    CTEClikLoop
  28.  
  29.         movem.l    D1-D2/A1,-(SP)    ;D0 and A0 need not be saved.
  30.  
  31.         movea.l    gDefaultClikLoopUPP,A0
  32.         jsr    (A0)        ;Execute TextEdit's default clikLoop.
  33.  
  34.         movem.l    (SP)+,D1-D2/A1    ; restore the world as it was
  35.         movem.l    D1-D2/A1,-(SP)    ;D0 and A0 need not be saved.
  36.  
  37.         jsr    CTEClikLoop
  38.  
  39.         movem.l    (SP)+,D1-D2/A1    ; restore the world as it was
  40.         moveq    #1,D0        ; clear the zero flag so TextEdit keeps going
  41.         rts
  42.  
  43.         ENDP
  44.  
  45. ************
  46.  
  47. ASMNOCARET    PROC    EXPORT
  48.         move.l    (A7)+,D0
  49.         rts
  50.  
  51.         ENDP
  52.  
  53. ************
  54.  
  55.         END 
  56.  
  57.